1. Field of Invention
The present invention relates to a method for controlling transmission speed of multi-cast packets, and more particularly to a high-precision method for controlling the transmission speed of the multi-cast packets.
2. Related Art
In the field relating to the transmission technology of network packets, how to control of transmission speed is an important topic. The transmission speed of network data is obtained by calculating a ratio between a data transmission amount and a transmission time. Currently, a Microsoft Windows system uses a Sleep function to control the transmission speed of the network packet. The Sleep function does not occupy network resources during a sleep process, but the Sleep function has very low precision, and probably can only reach a precision of a millisecond (ms) level. An error in practical execution of the Sleep function may generally reach 10 ms, and therefore, the Sleep function is not suitable for applications requiring a high and stable transmission speed.
The Windows system also provides a counter with the accuracy that can be synchronized with a machine clock, and the counter can reach a precision of a nanosecond (ns) level. However, the method of using the counter for sleep requires frequent counting and confirmation of whether the sleep time is reached by the system, so that central processor unit (CPU) resources are largely occupied, and then operation of other software and the system is affected.
That is to say, during convention control of the transmission speed of network packets such as multi-cast packets, a problem of fluctuation of the transmission speed easily caused by the low sleep precision, or a defect of requiring excessive consumption of CPU resources exists.